Skip to content

fix(settings): confirm app-token revoke and preserve wipe state#60644

Merged
artonge merged 7 commits into
masterfrom
fix/app-token-delete-confirm
May 26, 2026
Merged

fix(settings): confirm app-token revoke and preserve wipe state#60644
artonge merged 7 commits into
masterfrom
fix/app-token-delete-confirm

Conversation

@pringelmann
Copy link
Copy Markdown
Contributor

@pringelmann pringelmann commented May 21, 2026

Summary

Revoking an app password now opens an NcDialog confirmation. For tokens marked for remote wipe the dialog uses a red error card and the destructive button reads "Revoke and cancel wipe", so cancelling an in-flight wipe is a deliberate click rather than a side effect of clicking the trash icon.

Two admin-only deletion paths used to drop the wipe marker the same way the user-facing controller did. Both are guarded now: occ user:auth-tokens:delete refuses wipe-pending tokens unless --cancel-wipe is passed, and OAuth2 client revocation skips matching wipe-pending tokens (with a log line) so the wipe outlives the client.

Backports needed for stable34, stable33, stable32.

Screenshot

Screenshot_2026-05-21_17-02-03

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Screenshots before/after for front-end changes
  • Documentation (manuals or wiki) has been updated or is not required
  • Backports requested where applicable (ex: critical bugfixes)
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone added for target branch/version (ex: 32.x for stable32)

@pringelmann pringelmann added this to the Nextcloud 34 milestone May 21, 2026
@pringelmann pringelmann self-assigned this May 21, 2026
@pringelmann pringelmann marked this pull request as ready for review May 22, 2026 09:17
@pringelmann pringelmann requested review from a team as code owners May 22, 2026 09:17
@pringelmann pringelmann requested review from come-nc, nfebe, provokateurin, sorbaugh and susnux and removed request for a team May 22, 2026 09:17
Comment thread apps/settings/src/components/AuthTokenDeleteDialog.vue Outdated
Comment thread apps/settings/src/components/AuthTokenDeleteDialog.vue Outdated
Comment thread apps/settings/src/components/AuthTokenDeleteDialog.vue Outdated
Comment thread apps/settings/src/components/AuthTokenWipeDialog.vue Outdated
Copy link
Copy Markdown
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionality wise approved, some code comments

Comment thread apps/settings/src/components/AuthToken.vue Outdated
Comment thread apps/settings/src/components/AuthToken.vue Outdated
Comment thread apps/settings/src/components/AuthToken.vue Outdated
@pringelmann pringelmann force-pushed the fix/app-token-delete-confirm branch from ec56a07 to 01f5ecc Compare May 26, 2026 09:32
@pringelmann
Copy link
Copy Markdown
Contributor Author

/backport to stable34

@pringelmann
Copy link
Copy Markdown
Contributor Author

/backport to stable33

@pringelmann
Copy link
Copy Markdown
Contributor Author

/backport to stable32

Adds an NcDialog confirmation to the Revoke action; deletion was
previously instant on click. When the token is marked for remote
wipe, the dialog surfaces a warning and the destructive button
switches to "Cancel wipe and revoke" so cancelling an in-flight
wipe is an explicit opt-in.

Also migrates the existing Wipe confirm from the legacy
window.OC.dialogs.confirm helper to NcDialog, matching the new
delete dialog. The auth token store actions are now pure API
callers; the UI does the gating.

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann pringelmann force-pushed the fix/app-token-delete-confirm branch from 0acb5ed to 407d4fe Compare May 26, 2026 14:41
@artonge artonge merged commit 492a42b into master May 26, 2026
233 of 249 checks passed
@artonge artonge deleted the fix/app-token-delete-confirm branch May 26, 2026 19:21
@backportbot
Copy link
Copy Markdown

backportbot Bot commented May 26, 2026

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/60644/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 05a188e3 16ca990b 4b1c3fbe eaf565f2 1d035b4c bbdb7d01 407d4fee

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/60644/stable32

Error: Failed to check for changes with origin/stable32: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
Copy link
Copy Markdown

backportbot Bot commented May 26, 2026

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/60644/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 05a188e3 16ca990b 4b1c3fbe eaf565f2 1d035b4c bbdb7d01 407d4fee

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/60644/stable33

Error: Failed to check for changes with origin/stable33: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants